#include<bits/stdc++.h>
using namespace std;
typedef double db;
const int N=10002;
int n,q[N],tp; db ans;
struct node{db x,y;}p[N];
bool cmp(node p1,node p2){
	return (p1.x<p2.x || (p1.x==p2.x && p1.y<p2.y));
}
db vec(node a,node b,node c){
	db x=b.x-a.x,y=b.y-a.y,x2=c.x-b.x,y2=c.y-b.y;
	//cout<<x<<" "<<y<<" "<<x2<<" "<<y2<<endl;
	return x*y2-y*x2;
}
db squ(db x){
	return x*x;
}
db dis(node p1,node p2){
	return sqrt(squ(p1.x-p2.x)+squ(p1.y-p2.y));
}
int main()
{
	cin>>n;
	for(int i=1;i<=n;i++) scanf("%lf %lf",&p[i].x,&p[i].y);
	sort(p+1,p+n+1,cmp);
	for(int i=1;i<=n;i++){ //cout<<"i="<<i<<endl;
		//cout<<p[i].x<<" "<<p[i].y<<endl;
		while(tp>=2 && vec(p[q[tp-1]],p[q[tp]],p[i])<0) tp--;
		q[++tp]=i;
	}
	for(int i=1;i<tp;i++) ans+=dis(p[q[i]],p[q[i+1]]);
	//for(int i=1;i<=tp;i++) cout<<q[i]<<" "; cout<<endl;
	//cout<<ans<<endl;
	tp=0;
	for(int i=n;i>=1;i--){ //cout<<"i="<<i<<endl;
		while(tp>=2 && vec(p[q[tp-1]],p[q[tp]],p[i])<0) tp--;
		q[++tp]=i;
	}
	for(int i=1;i<tp;i++) ans+=dis(p[q[i]],p[q[i+1]]);//cout<<q[i]<<" "; cout<<endl;
	//for(int i=1;i<=tp;i++) cout<<q[i]<<" "; cout<<endl;
	printf("%.2lf\n",ans); //cout<<vec((node){0,0},(node){1,0},(node){1,1});
	return 0;
}
